const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const mongoosePaginate = require('mongoose-paginate');

// 设置用户姓名、密码、邮箱及注册日期
var UserSchema = new mongoose.Schema({
    name:String,
    password:String,
    email:String,
    date:{type:Date,default: Date.now }
});
// 将数据模型应用分页插件
UserSchema.plugin(mongoosePaginate);


module.exports = mongoose.model('User', UserSchema,'user');